package com.yayako.modules.department.service;

import com.yayako.modules.department.entity.Department;
import com.yayako.modules.department.mapper.DepartmentMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class DeptService {
  @Autowired DepartmentMapper departmentMapper;

  public Department getDeptById(String id) {
    return departmentMapper.selectByPrimaryKey(id);
  }

  public List<Department> getData() {
    return departmentMapper.getData();
  }

  public Department getDeptByName(String name) {
    return departmentMapper.getDeptByName(name);
  }
}
